Skip to content

Update observables + AD tests with MTK v10 #1055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 18, 2025

Conversation

DhairyaLGandhi
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

There seem to be some variable map changes in latest MTK, so updating tests to reflect that.

Add any other context about the problem here.

@ChrisRackauckas
Copy link
Member

If you change the vector ordering you need to change back the answer ordering though 😅

@DhairyaLGandhi
Copy link
Member Author

We take the output of canonicalize(Tunable(), ...) and the solve calls through the usual probmap and probpmap, which will order accordingly, and we AD through.

@ChrisRackauckas
Copy link
Member

    du_ = [1.0, 1.0, 1.0, 0.0]
    du = [du_ for _ in sol[[D(x), x, y, z]]]

the order of this is not based on the tunable order, it's based on the sort order of u. That's why it broke. I am saying if you fix the order by checking it symbolically, then you should change the du_ being tested to the order of the symbolic index.

@DhairyaLGandhi
Copy link
Member Author

I had pushed 470880e to fix that.

@DhairyaLGandhi
Copy link
Member Author

There seems to be a new failure in SciMLSensitivity/Core1 that I haven't seen earlier. But that is independent of this PR, since this only touches different files, from a different test set

@DhairyaLGandhi
Copy link
Member Author

@ChrisRackauckas solution_interface.jl and modelingtoolkit_remake.jl seem to have non AD related changes, so I was curious if there were any missing changes in this PR that you had in mind.

@ChrisRackauckas
Copy link
Member

@AayushSabharwal can take it separately from here.

@ChrisRackauckas ChrisRackauckas merged commit 88dfa07 into SciML:master Jun 18, 2025
50 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants